import com.alibaba.moco.RedisPoolInstance
import com.alibaba.moco.util.BaseTypeUtil
import net.sf.json.JSONObject
import org.apache.commons.lang.StringUtils
import script.GlobalValues

/**
 * 模拟 滴滴 获取全部订单
 * Created by wb-lj240895 on 2016/11/1.
 */
def excute(request){
    def redis = RedisPoolInstance.getRedisClient()
    def params = request.getParameterMap();
    HappytrpRequest req = BaseTypeUtil.mapToBean(params, HappytrpRequest.class) as HappytrpRequest
    def id = req.getId()
    def map = [:]
    System.out.println("id"+id)
    if (id != null){
        String order_id = redis.get(GlobalValues.KEY_RELATION+id)

        map.put("order_id",order_id)
    }
    return map
}
class HappytrpRequest{
    String id
}